/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 * General interface of collection. It has restricted access to collection: 
 * there are no set methods.
 * @author Dmitri Paziy
 */
public interface RestrictedCollection<T> {
    /**
     * Gets an element of collection with specified index
     * @param index Index of the element
     * @return Element
     */
    public T get(int index);
    /**
     * Gets amount of elements in collection
     * @return Amount of elements
     */
    public int size();
    /**
     * Presents collection as array
     * @return Array representation of collection
     */
    public Object[] toArray();
    /**
     * Gets amount of elements that memory was allocated for
     * @return Current maximum amount of elements
     */
    public int capacity();
}
